Repository navigation
feat(user-management): snake_case RegisterRequest, activate-account endpoint, validation constraints - #24
Merged
Conversation
…fields firstName, lastName, and confirmPassword are multi-word camelCase fields. They must be serialised as first_name, last_name, and confirm_password in the JSON contract, consistent with every other compound field across the DTOs (see UserResponse, ProductResponse, CategoryResponse, etc.). Single-word fields (username, email, password) need no annotation because their Java name and the JSON key are identical.
Aligns the endpoint name with the kebab-case convention used by all other multi-word paths in this project (forgot-password, reset-password). The new path /api/v1/auth/activate-account is also more self-describing for a client consuming the API.
Keeps the endpoint publicly accessible (no authentication required) under its new path /api/v1/auth/activate-account.
The frontend route receiving the activation token is renamed from /auth/activate to /auth/activate-account to match the backend endpoint path change.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@JsonPropertysnake_case annotations to compound fields inRegisterRequest(first_name,last_name,confirm_password) for consistency with the rest of the API contract/activateto/activate-accountacrossAuthController,SecurityConfig,EmailServiceImpl, and all tests_09_ShouldReturn400_WhenActivationTokenInvalidusing the updated endpoint pathTest plan
mvn test)first_name,last_name,confirm_passwordaccepted by the APIGET /api/v1/auth/activate-account?token=...activates accounts correctly